//
//  CellOfLine.m
//  ProjectA_ManualGuest
//
//  Created by dingcong on 16/6/15.
//  Copyright © 2016年 丁聪. All rights reserved.
//

#import "CellOfLine.h"
#import "Masonry.h"
#import "PrefixHeader.pch"
@interface CellOfLine()
@property(nonatomic, retain)UILabel *lable;
@property(nonatomic, retain)UIView *leftLine;
@property(nonatomic, retain)UIView *rightLine;

@end
@implementation CellOfLine


- (void)dealloc
{
    
    [_lable release];
    [_leftLine release];
    [_rightLine release];
    
    [super dealloc];
    
    
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creat];
        self.backgroundColor = [UIColor clearColor];
    }
    
    return self;
    
    
    
}

- (void)creat
{
    self.leftLine = [[UIView alloc]init];
    [self.contentView addSubview:self.leftLine];
    [self.leftLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(self.contentView.mas_leading).offset(0);
        make.top.equalTo(self.contentView.mas_top).offset(25);
        make.height.offset(0.5);
        make.width.offset(SCREEN_WIDTH / 2 - 50);
    }];
    
    self.leftLine.backgroundColor = [UIColor lightGrayColor];
    [self.leftLine release];
    
    self.lable = [[UILabel alloc]init];
    [self.contentView addSubview:self.lable];
    [self.lable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(self.leftLine.mas_trailing).offset(8);
        make.top.equalTo(self.contentView.mas_top).offset(20);
        make.height.offset(10);
        make.width.offset(70);
    }];
    self.lable.text = @"热门专题";
    self.lable.textColor = [UIColor grayColor];
    self.lable.font = [UIFont systemFontOfSize:14.5];
    self.lable.textAlignment = NSTextAlignmentCenter;

//    self.lable.backgroundColor = [UIColor greenColor];
    [self.lable release];
    
    
    self.rightLine = [[UIView alloc]init];
    self.rightLine.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:self.rightLine];
    [self.rightLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(self.lable.mas_trailing).offset(8);
        make.centerY.equalTo(self.leftLine.mas_centerY);
        make.height.equalTo(self.leftLine.mas_height);
        make.width.offset(SCREEN_WIDTH / 2);
    }];
    [self.rightLine release];
    
    
}



@end
